from django.db import models

class Course(models.Model):
    # 定义年龄段选择项
    AGE_GROUP_CHOICES = [
        ('primary_low', '小学低年级'),
        ('primary_high', '小学高年级'),
        ('junior_low', '初中低年级'),
        ('junior_high', '初中高年级'),
        ('high_school', '高中'),
        ('adult', '成人'),
    ]
    
    title = models.CharField('课程名称', max_length=200)
    age_group = models.CharField(
        '适配年龄段',
        max_length=20,
        choices=AGE_GROUP_CHOICES,
        default='primary_low'
    )
    # 其他字段...
    
    def __str__(self):
        return self.title
    
    class Meta:
        verbose_name = '课程'
        verbose_name_plural = '课程'
